<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    /* .box {
      overflow: auto;
    } */

    .container {
      overflow: auto; /* 触发BFC，解决margin折叠*/
    }

    .box1 {
      height: 200px;
      width: 400px;
      background-color: orange;

      margin-bottom: 30px;
    }

    .box2 {
      height: 150px;
      background-color: purple;

      margin-top: 50px;
    }

  </style>
</head>
<body>
  
  <div class="container">
    <div class="box1"></div>
  </div>
  <div class="box2"></div>

  <p>
    <a href=""></a>
    <span></span>
  </p>

</body>
</html>